 <?php 
function chk_val($str)
{
 if (isset($_POST['listetypeAgent']))
	{
	if ($_POST['listetypeAgent'] == $str)
		echo 'selected';
	}
else
 $_POST['listetypeAgent'] = "Client";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" media="screen" type="text/css" title="Inscr_Css" href="_css/NewCliF.css" />
<link rel="stylesheet" media="screen" type="text/css" title="Inscr_Css" href="_css/validationEngine.jquery.css" />
<script src="_js/validate/jquery.js" type="text/javascript"></script>
<script src="_js/validate/jquery.validationEngine-fr.js" type="text/javascript"></script>
<script src="_js/validate/jquery.validationEngine.js" type="text/javascript"></script>
 <div id="main">
  <div id="main_title">Formulaire d'inscription</div>
<!--  <div id="cadre"> -->
   <div id="formu">
   	<form action="<?php echo ABS_PATH.ROOT; ?>?page=Inscription" method="post" name="TypeAgent">
	<label for="Agent">Type d'agent :</label>
	<select name="listetypeAgent" onchange="javascript:TypeAgent.submit();">
		<option <?php chk_val("client"); ?> value="client">Client</option>
     	<option <?php chk_val("transporteur"); ?> value="transporteur">Transporteur</option>
     	<option <?php chk_val("entrepot"); ?> value="entrepot">Gerant entrepot</option>
     	<option <?php chk_val("fmp"); ?> value="fmp">Fmp</option>
	 	<option <?php chk_val("usine"); ?> value="usine">Usine</option>
	</select>
	</form>
  <br/>
  <form id="formID" class="formular" method="post" action="<?php //echo ABS_PATH.ROOT; ?>?page=Inscription&fct=Inscription">
    <label for="inscr_gnl" class="label_form">GNL :</label>
	<input type="text" name="inscr_gnl" class="validate[required,length[0,20]]" id="inscr_gnl" /><br />
	<label for="inscr_rs" class="label_form">Raison Social :</label>
    <input type="text" name="inscr_rs" class="validate[required]" id="inscr_rs"/><br />
	<label for="inscr_adr" class="label_form">Adresse :</label>
    <input type="text" name="inscr_adr" class="validate[required]" id="inscr_adr"/><br />
	<label for="inscr_ville" class="label_form">Ville :</label>
    <input type="text" name="inscr_ville" class="validate[required]" id="inscr_ville"/><br />
	<label for="inscr_cp" class="label_form">Code Postale :</label>
    <input type="text" name="inscr_cp" class="validate[required,custom[onlyNumber], length[5,5]]" id="inscr_cp"/><br />
    <label for="inscr_mail" class="label_form">Region :</label>
    <input type="text" name="inscr_region" class="validate[required]" id="inscr_region"/><br />
	<label for="inscr_mail" class="label_form">E-Mail :</label>
    <input type="text" name="inscr_mail" class="validate[required,custom[email]]" id="inscr_mail"/><br />
	<label for="inscr_mdp" class="label_form">Mot de passe :</label>
    <input type="password" name="inscr_mdp" class="validate[required]" id="inscr_mdp"/><br />
    <label for="inscr_mdp2" class="label_form">Confirmation :</label>
    <input type="password" name="inscr_mdp2" class="validate[required,confirm[inscr_mdp]]" id="inscr_mdp2"/><br />
	<label for="inscr_gpsLA" class="label_form">GPS Latitude :</label>
    <input type="text" name="inscr_gpsLA" class="validate[required]" id="inscr_gpsLA"/><br />
	<label for="inscr_gpsLO" class="label_form">GPS Longitude :</label>
    <input type="text" name="inscr_gpsLO" class="validate[required]" id="inscr_gpsLO"/><br />
	<label for="inscr_tel" class="label_form">Telephone :</label> 
    <input type="text" name="inscr_tel" class="validate[required]" id="inscr_tel"/><br />
	<label for="inscr_mob" class="label_form">Fax :</label>
    <input type="text" name="inscr_mob" class="validate[required]" id="inscr_mob"/><br />
	<input type="hidden" name="agent" value="<?php echo $_POST['listetypeAgent']; ?>"/>
	<input id ="submit" type="submit" />
   </form>
   </div>
  <!--</div>-->
  <div class="Error">
   <?php 
	if (isset($error))
	  echo $error; 
   ?> 
 </div>
</div>